﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<title>宿舍管理系统</title>
<link rel="shortcut icon" href="${pageContext.request.contextPath }/statics/images/logo.jpg"/>
<link href="${pageContext.request.contextPath}/statics/bootstrap-3.3.5-dist/css/bootstrap.min.css" title="" rel="stylesheet" />
<link title="" href="${pageContext.request.contextPath}/statics/css/style.css" rel="stylesheet" type="text/css"  />
<link title="blue" href="${pageContext.request.contextPath}/statics/css/dermadefault.css" rel="stylesheet" type="text/css"/>
<link title="green" href="${pageContext.request.contextPath}/statics/css/dermagreen.css" rel="stylesheet" type="text/css" disabled="disabled"/>
<link title="orange" href="${pageContext.request.contextPath}/statics/css/dermaorange.css" rel="stylesheet" type="text/css" disabled="disabled"/>
<link href="${pageContext.request.contextPath}/statics/css/templatecss.css" rel="stylesheet" title="" type="text/css" />
<script src="${pageContext.request.contextPath}/statics/js/jquery-1.12.4.js"></script>
<script src="${pageContext.request.contextPath}/statics/script/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/statics/script/jquery.cookie.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/statics/bootstrap-3.3.5-dist/js/bootstrap.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath }/statics/ckeditor/ckeditor.js"></script>

<style type="text/css">
	
	a{text-decoration:none;} 
	.max:hover{
		width: 20%;
		height: 20%;
	}
</style>

<script type="text/javascript">
    window.onload = function()
    {
        CKEDITOR.replace( 'description');
        CKEDITOR.replace( 'description1');
        CKEDITOR.replace( 'description2');
    };
</script>
<script>
     function fileSelect(elementId){
     document.getElementById(elementId).click();
	document.getElementById("show1").style.backgroundImage = "url('')";
	$("#img1").hide();
     }
     function showImage(file,id){
            var div = document.getElementById(id);


            if (file.files && file.files[0])
            {
                div.innerHTML ='<img id=img_'+id+'>';
                var img = document.getElementById('img_'+id);
                img.onload = function(){
                    img.width  =  "100";
                }
                var reader = new FileReader();
                reader.onload = function(evt){img.src = evt.target.result;}
                reader.readAsDataURL(file.files[0]);
            }
            else //兼容IE
            {
                var sFilter='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="';
                file.select();
                var src = document.selection.createRange().text;
                div.innerHTML ='<img id=img_'+id+'>';
                var img = document.getElementById('img_'+id);
                img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;
                var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
                status =('rect:'+rect.top+','+rect.left+','+rect.width+','+rect.height);
                div.innerHTML = "<div id=divhead style='width:"+rect.width+"px;height:"+rect.height+"px;margin-top:"+rect.top+"px;"+sFilter+src+"\"'></div>";
            }
        }
</script>
<script>
     function fileSelect(elementId){
     document.getElementById(elementId).click();
	document.getElementById("show11").style.backgroundImage = "url('')";
     }
     function showImage(file,id){
            var div = document.getElementById(id);


            if (file.files && file.files[0])
            {
                div.innerHTML ='<img id=1img_'+id+'>';
                var img = document.getElementById('1img_'+id);
                img.onload = function(){
                    img.width  =  "100";
                }
                var reader = new FileReader();
                reader.onload = function(evt){img.src = evt.target.result;}
                reader.readAsDataURL(file.files[0]);
            }
            else //兼容IE
            {
                var sFilter='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="';
                file.select();
                var src = document.selection.createRange().text;
                div.innerHTML ='<img id=1img_'+id+'>';
                var img = document.getElementById('1img_'+id);
                img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;
                var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
                status =('rect:'+rect.top+','+rect.left+','+rect.width+','+rect.height);
                div.innerHTML = "<div id=1divhead style='width:"+rect.width+"px;height:"+rect.height+"px;margin-top:"+rect.top+"px;"+sFilter+src+"\"'></div>";
            }
        }
</script>
<script>
     function fileSelect(elementId){
     document.getElementById(elementId).click();
	document.getElementById("show12").style.backgroundImage = "url('')";
     }
     function showImage(file,id){
            var div = document.getElementById(id);


            if (file.files && file.files[0])
            {
                div.innerHTML ='<img id=2img_'+id+'>';
                var img = document.getElementById('2img_'+id);
                img.onload = function(){
                    img.width  =  "100";
                }
                var reader = new FileReader();
                reader.onload = function(evt){img.src = evt.target.result;}
                reader.readAsDataURL(file.files[0]);
            }
            else //兼容IE
            {
                var sFilter='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="';
                file.select();
                var src = document.selection.createRange().text;
                div.innerHTML ='<img id=2img_'+id+'>';
                var img = document.getElementById('2img_'+id);
                img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;
                var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
                status =('rect:'+rect.top+','+rect.left+','+rect.width+','+rect.height);
                div.innerHTML = "<div id=2divhead style='width:"+rect.width+"px;height:"+rect.height+"px;margin-top:"+rect.top+"px;"+sFilter+src+"\"'></div>";
            }
        }
</script>

</head>

<body>

<!-- 显示时间开始 -->
	<script type="text/JavaScript">
		$(function() {
			var data=new Date();
			var hour=data.getHours();
			var year=data.getFullYear();
			var month=data.getMonth();
			var date=data.getDate();
			var day=data.getDay();
			if(day==1){
				day="一";
			}else if(day==2){
				day="二";
			}else if(day==3){
				day="三";
			}else if(day==4){
				day="四";
			}else if(day==5){
				day="五";
			}else if(day==6){
				day="六";
			}else if(day==0){
				day="日";
			}
			$("#Hours").text(hour);
			$("#year").text(year);
			$("#month").text(month+1);
			$("#date").text(date);
			$("#day").text(day);
			
		})
	</script>

<!-- 显示时间结束 -->


<nav class="nav navbar-default navbar-mystyle navbar-fixed-top">
  <div class="navbar-header">
    <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> 
     <span class="icon-bar"></span> 
     <span class="icon-bar"></span> 
     <span class="icon-bar"></span> 
    </button>
    <a class="navbar-brand mystyle-brand"><span class="glyphicon glyphicon-home"></span></a> </div>
  <div class="collapse navbar-collapse">
    <ul class="nav navbar-nav">
      <li class="li-border"><a class="mystyle-color" href="#">宿舍管理控制台</a></li>
     <!-- <li class="dropdown li-border"><a href="#" class="dropdown-toggle mystyle-color" data-toggle="dropdown">产品与服务<span class="caret"></span></a> --> 
        <!----下拉框选项---->
         <!--<div class="dropdown-menu topbar-nav-list">
             <div class="topbar-nav-col">
               <div class="topbar-nav-item">
               <p class="topbar-nav-item-title">弹性计算</p>
               <ul>
                 <li><a href="#">
                     <span class="glyphicon glyphicon-road"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-picture"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-gift"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                </ul>
               </div>
               
               <div class="">
               <p class="topbar-nav-item-title">弹性计算</p>
               <ul>
                 <li><a href="#">
                     <span class="glyphicon glyphicon-road"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-picture"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-gift"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
               </ul>
               </div> 
             </div>
             
             
             <div class="topbar-nav-col">
               <div class="topbar-nav-item">
               <p class="topbar-nav-item-title">弹性计算</p>
               <ul>
                 <li><a href="#">
                     <span class="glyphicon glyphicon-road"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-picture"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-gift"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                </ul>
               </div>
               
               <div class="">
               <p class="topbar-nav-item-title">弹性计算</p>
               <ul>
                 <li><a href="#">
                     <span class="glyphicon glyphicon-road"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-picture"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
                  <li><a href="#">
                     <span class="glyphicon glyphicon-gift"></span> 
                     <span class="">云服务器 ECS</span> 
                 </a>
                 </li>
               </ul>
               </div>
               
             </div>
             
         </div>-->
      </li>
    </ul>
    
    <ul class="nav navbar-nav pull-right">
    <c:if test="${userlogin.userrole==1}">
     <!-- <li class="li-border">
          <a href="#" class="mystyle-color">
            <span class="glyphicon glyphicon-bell"></span>
            <span class="topbar-num">0</span>
          </a>
      </li> -->  
    </c:if>  
      <!-- <li class="li-border dropdown"><a href="#" class="mystyle-color" data-toggle="dropdown">
      <span class="glyphicon glyphicon-search"></span> 搜索</a>
         <div class="dropdown-menu search-dropdown">
            <div class="input-group">
                <input type="text" name="context" id="Searchcontext" class="form-control" value="${context}">
                 <span class="input-group-btn">
                   <button type="button" id="search" class="btn btn-default">搜索</button>
                   <script type="text/JavaScript">
						$(function() {
							$("#search").click(function() {
								var context=$("#Searchcontext").val();
								location.href="${pageContext.request.contextPath}/users/page1?context="+context;
							})
						})
					</script>
                </span>
            </div>
         </div>
      </li> --> 
     <!-- <li class="dropdown li-border"><a href="#" class="dropdown-toggle mystyle-color" data-toggle="dropdown">帮助与文档<span class="caret"></span></a>
        <ul class="dropdown-menu">
          <li><a href="#">帮助与文档</a></li>
          <li class="divider"></li>
          <li><a href="#">论坛</a></li>
          <li class="divider"></li>
          <li><a href="#">博客</a></li>
        </ul>
      </li>
       --> 
      <li class="dropdown li-border"><a href="#" class="dropdown-toggle mystyle-color" data-toggle="dropdown">${userlogin.username}<span class="caret"></span></a>
        <ul class="dropdown-menu">
          <li><a href="${pageContext.request.contextPath}/users/outlogin">退出</a></li>
        </ul>
      </li>
      <li class="dropdown"><a href="#" class="dropdown-toggle mystyle-color" data-toggle="dropdown">换肤<span class="caret"></span></a>
        <ul class="dropdown-menu changecolor">
          <li id="blue"><a href="#">蓝色</a></li>
          <li class="divider"></li>
          <li id="green"><a href="#">绿色</a></li>
          <li class="divider"></li>
          <li id="orange"><a href="#">橙色</a></li>
        </ul>
      </li>
    </ul>
  </div>
</nav>
<div class="down-main">
  <div class="left-main left-full">
    <div class="sidebar-fold"><span class="glyphicon glyphicon-menu-hamburger"></span></div>
    <div class="subNavBox">
      <div class="sBox">
       <div class="subNav sublist-down"><span class="title-icon glyphicon glyphicon-chevron-down"></span><span class="sublist-title">系统中心</span>
        </div>
        <ul class="navContent" style="display:block">
          <li class="active">
            <div class="showtitle" style="width:100px;"><img src="${pageContext.request.contextPath}/statics/img/leftimg.png" />系统首页</div>
            <a href="${pageContext.request.contextPath}/users/redirct"><span class="sublist-icon glyphicon glyphicon-user"></span><span class="sub-title">系统首页</span></a> </li>
         <!-- <li>
            <div class="showtitle" style="width:100px;"><img src="${pageContext.request.contextPath}/statics/img/leftimg.png" />消息中心</div>
            <a href="message.html"><span class="sublist-icon glyphicon glyphicon-envelope"></span><span class="sub-title">消息中心</span></a> </li>
          <li>
            <div class="showtitle" style="width:100px;"><img src="${pageContext.request.contextPath}/statics/img/leftimg.png" />短信</div>
            <a href="smsInfo.html"><span class="sublist-icon glyphicon glyphicon-bullhorn"></span><span class="sub-title">短信</span></a></li>
          <li>
            <div class="showtitle" style="width:100px;"><img src="${pageContext.request.contextPath}/statics/img/leftimg.png" />实名认证</div>
            <a href="identify.html"><span class="sublist-icon glyphicon glyphicon-credit-card"></span><span class="sub-title">实名认证</span></a></li>
             --> 
        </ul>
      </div>
      <div class="sBox">
        <div class="subNav sublist-up"><span class="title-icon glyphicon glyphicon-chevron-up"></span><span class="sublist-title">个人中心</span></div>
        <ul class="navContent" style="display:none">
          <li>
            <div class="showtitle" style="width:100px;"><img src="${pageContext.request.contextPath}/statics/img/leftimg.png" />编辑资料</div>
            <a href="${pageContext.request.contextPath}/users/touserinfo?userid=${userlogin.userid}"><span class="sublist-icon glyphicon glyphicon-user"></span><span class="sub-title">编辑资料</span></a></li>
         <!-- <li>
            <div class="showtitle" style="width:100px;"><img src="img/leftimg.png" />添加新闻</div>
            <a href="#"><span class="sublist-icon glyphicon glyphicon-user"></span><span class="sub-title">新闻管理</span></a></li>
          <li>
            <div class="showtitle" style="width:100px;"><img src="img/leftimg.png" />添加新闻</div>
            <a href="#"><span class="sublist-icon glyphicon glyphicon-user"></span><span class="sub-title">添加新闻</span></a></li>
          <li>
            <div class="showtitle" style="width:100px;"><img src="img/leftimg.png" />新闻管理</div>
            <a href="#"><span class="sublist-icon glyphicon glyphicon-user"></span><span class="sub-title">新闻管理</span></a></li>
             --> 
        </ul>
      </div>
    </div>
  </div>
<div class="right-product view-product right-full">
     <div class="container-fluid">
				<div class="manage account-manage info-center">
					<div class="page-header">
                                           <div class="pull-left">
						<h4>个人中心</h4>      
					</div>
                                        </div>
					<dl class="account-basic clearfix">
						<dt class="pull-left">
						<div class="account-head">
						
						<form method="post" enctype="multipart/form-data" action="${pageContext.request.contextPath}/users/updateheadimg">
						<input type="file" name="a_idPicPath" id="a_idPicPath" onchange="showImage(this,'show1');" style="left:-9999px;position:absolute;" />
						<input type="hidden" name="userid" value="${users.userid}" />
						<div id="show1" onclick="fileSelect('a_idPicPath')">
						<img width="100px" height="100px"  id="img1" src="${users.headimg}" alt="" title="点击更换头像"/>
						</div>
						<input type="submit" class="btn btn-mystyle btn-sm" value="保存" /><span>${messag}</span>
						</form>
							
							
							
						</div>
						</dt>
						<dd class="pull-left margin-large-left margin-small-top">
						<p class="text-small">
							<span class="show pull-left base-name">会员账号</span>:<span class="margin-left">${users.username} </span>
						</p>
						<p class="text-small">
							<span class="show pull-left base-name">账号状态</span>:
							<span class="margin-left">
								<c:if test="${users.status==1}">正常</c:if>
								<c:if test="${users.status==2}">异常</c:if>
							</span>
							<!-- <a class="margin-left text-main text-underline" href="#">立即认证</a> -->
						</p>
						<p class="text-small">
							<span class="show pull-left base-name">注册时间</span>:<span class="margin-left">${users.jointime}</span>
						</p>
						</dd>
					</dl>
					<div class="account-basic clearfix">
						<span class="pull-left show text-small">您当前的账号安全程度</span>
						<div class="progress-bar pull-left margin-large-left margin-large-35">
							<div style="background: rgb(255, 153, 0) none repeat scroll 0% 0%; width: 180px;" data-width="100">
							</div>
						</div>
						<span class="pull-left show text-small">安全级别: <span style="color: rgb(255, 153, 0);" class="leval-safe">高</span></span>
					</div>
					<ul class="accound-bund">
						<li class="clearfix">
						<span class="bund-class">登录密码</span>
						<span class="w45">安全性高的密码可以使账号更安全，建议您定期更换密码，设置一个包含字母，符号或数字中至少两项且长度超过6位的密码。</span>
						<span class="pull-right margin-large-right">
						<i class="glyphicon glyphicon-ok-circle pull-left"></i>
						<em class="margin-right text-green-deep">已设置</em>
						<a href="#" style="text-decoration: none;" id="xiugaipassword" data-panel="modify_pass" data-title="修改密码-修改密码" data-callback="$(&quot;#modify_pass&quot;).submit();" data-btn="下一步,取消" class="button-word1 margin-left btn_ajax_open">修改</a>
						<a href="#" style="text-decoration: none;" id="xiugaipasswordquxiao" data-panel="modify_pass" data-title="修改密码-修改密码" data-callback="$(&quot;#modify_pass&quot;).submit();" data-btn="下一步,取消" class="button-word1 margin-left btn_ajax_open">取消</a>
						<br />
						<input data-panel="modify_pass2" data-title="修改密码-修改完成" data-btn="完成" data-callback="layer.closeAll();" class="modify_pass_setup2 btn_ajax_open" value="第三步" type="hidden">
						</span>
						<br /><br />
						<script type="text/JavaScript">
							$(function() {
								$("#hiddenpassword").hide();
								$("#xiugaipasswordquxiao").hide();
								$("#xiugaipassword").click(function() {
									$("#xiugaipassword").hide();
									$("#xiugaipasswordquxiao").show();
									$("#hiddenpassword").slideDown(2000);
								})
								$("#xiugaipasswordquxiao").click(function() {
									$("#xiugaipassword").show();
									$("#xiugaipasswordquxiao").hide();
									$("#hiddenpassword").slideUp(2000);
								})
							})
						</script>
						<script type="text/JavaScript">
							$(function() {
								var tishi="${message}";
								if(tishi!=null&&tishi!=""){
									alert(tishi);
								}
								var password="${users.password}";
								$("#oldpassword").blur(function() {
									var oldpassword=$("#oldpassword").val();
									if(oldpassword==null||oldpassword==""){
										$("#error").text("原密码不能为空");
									}else if(oldpassword!=password){
										$("#error").text("原密码不正确");
									}else{
										$("#error").text("");
									}
								})
								$("#newpassword").blur(function() {
									var newpassword=$("#newpassword").val();
									var pattr=/^[a-zA-Z]\w{5,17}$/;
									if(newpassword==null||newpassword==""){
										$("#error").text("新密码不能为空");
									}else if(!pattr.test(newpassword)){
										$("#error").text("新密码格式不正确");
									}else{
										$("#error").text("");
									}
								})
								$("#hiddenpassword").submit(function() {
									var oldpassword=$("#oldpassword").val();
									if(oldpassword==null||oldpassword==""){
										$("#error").text("原密码不能为空");
										return false;
									}else if(oldpassword!=password){
										$("#error").text("原密码不正确");
										return false;
									}
									var newpassword=$("#newpassword").val();
									var pattr=/^[a-zA-Z]\w{5,17}$/;
									if(newpassword==null||newpassword==""){
										$("#error").text("新密码不能为空");
										return false;
									}else if(!pattr.test(newpassword)){
										$("#error").text("新密码格式不正确");
										return false;
									}
									var renewpassword=$("#renewpassword").val();
									if(renewpassword==null||renewpassword==""){
										$("#error").text("重复密码不能为空！");
										return false;
									}else if(renewpassword!=newpassword){
										$("#error").text("重复密码不正确！");
										return false;
									}
								})
							})
						</script>
						<div id="hiddenpassword" style="width: 264px;">
						<br />
							<form id="passwordform" method="post" action="${pageContext.request.contextPath}/users/updateUsers">
							<input type="hidden" name="userid" value="${users.userid}" />
							<p>请填写原密码：<input type="password" id="oldpassword" name="oldpassword" value=""/></p>
							<p>请填写新密码：<input type="password" id="newpassword" name="password" value=""/></p>
							<p>请重复新密码：<input type="password" id="renewpassword" name="renewpassword" value=""/></p>
							<p align="right"><span id="error" style="color: red"></span><input type="submit" id="updatepassword" class="btn btn-mystyle btn-sm" value="确认修改"/></p>
							</form>
						</div>
						</li>
						
						<li class="clearfix">
						<span class="bund-class">邮箱绑定</span>
						<span class="w45">绑定邮箱可以用于安全验证、找回密码等重要操作</span>
						<span class="pull-right margin-large-right">
						<i class="glyphicon glyphicon-ok-circle pull-left"></i>
						<em class="margin-right text-green-deep">已设置</em>
						            					            		|
						<a href="#" id="xiugaiemail" data-panel="modify-email-revise" data-title="修改绑定邮箱-邮箱验证" data-btn="发送验证到邮箱,取消" data-callback="$(&quot;#modify_email&quot;).submit();" class="button-word1 margin-left btn_ajax_open">修改</a>
						<a href="#" id="xiugaiemailquxiao" data-panel="modify-email-revise" data-title="修改绑定邮箱-邮箱验证" data-btn="发送验证到邮箱,取消" data-callback="$(&quot;#modify_email&quot;).submit();" class="button-word1 margin-left btn_ajax_open">取消</a>
						<input data-panel="modify-email-revise2" data-title="修改绑定邮箱-修改成功" data-btn="完成" data-callback="layer.closeAll();" class="modif_email_setup2 btn_ajax_open" type="hidden">
						</span>
						<br /><br />
						<script type="text/JavaScript">
							$(function() {
								$("#hiddenemail").hide();
								$("#xiugaiemailquxiao").hide();
								$("#xiugaiemail").click(function() {
									$("#xiugaiemail").hide();
									$("#xiugaiemailquxiao").show();
									$("#hiddenemail").slideDown(2000);
								})
								$("#xiugaiemailquxiao").click(function() {
									$("#xiugaiemail").show();
									$("#xiugaiemailquxiao").hide();
									$("#hiddenemail").slideUp(2000);
								})
							})
						</script>
						<script type="text/JavaScript">
							$(function() {
								$("#putnum").click(function() {
									var email=$("#newemail").val();
									var part=/^\d{5,12}@[qQ][qQ]\.(com|cn)$/;
									if(email==null||email==""){
										$("#error2").text("请输入邮箱后再发送验证码");
									}else if(!part.test(email)){
										$("#error2").text("邮箱格式不正确");
									}else if(part.test(email)){
										$.get("${pageContext.request.contextPath}/users/ajaxemail",
												{"email":email},
												function(data) {
													$("#data").val(data);
												})
									}
								})
							})
							$(function() {
								$("#updateemail").submit(function() {
									var data=$("#data").val();
									var email=$("#newemail").val();
									var yanzhengma=$("#yanzhengma").val();
									if(email==null||email==""){
										$("#error2").text("请输入邮箱");
										return false;
									}
									if(yanzhengma==null||yanzhengma==""){
										$("#error2").text("请输入验证码");
										return false;
									}else if(yanzhengma!=data){
										$("#error2").text("验证码不正确");
										return false;
									}else{
										return true;
									}
								})
							})
						</script>
						<div id="hiddenemail" style="width: 221px;">
						<br />
							<form id="updateemail" action="${pageContext.request.contextPath}/users/updateUsers" method="post">
							<input type="hidden" id="data" value=""/>
							<input type="hidden" name="userid" value="${users.userid}" />
							<p>新邮箱：<input type="text" id="newemail" name="email" value=""/></p>
							<p>验证码：<input type="text" id="yanzhengma" style="width: 62px"/>&nbsp;&nbsp;<input type="button" id="putnum" class="btn btn-mystyle btn-sm" value="获取验证码" /></p>
							<p align="right"><span id="error2"></span><input type="submit" id="updateemail" class="btn btn-mystyle btn-sm"value="确定修改"/></p>
							</form>
						</div>
						</li>
						<li class="clearfix">
						<span class="bund-class">所属宿舍</span>
						<span class="w45">你本人的所属的宿舍的具体信息，能够确保你的信息是否正确</span>
						<span class="pull-right margin-large-right">
						<em class="margin-right text-green-deep">${lou}${ceng}${room}</em>            					            		
						</span>
						</li>
						<!-- <li class="clearfix border-bottom-none">
						<span class="bund-class">邀请链接</span>
						<span class="w45" id="fe_text">http://www.mycodes.net</span>
						<span class="pull-right margin-large-right">
						<a class="button-word1 margin-left" id="copy_button" data-clipboard-target="fe_text" href="#">复制链接</a>
						</span>
						</li>
						 -->
					</ul>
				</div>
		</div>
  </div>




  
<script type="text/javascript">
$(function(){
/*换肤*/
$(".dropdown .changecolor li").click(function(){
	var style = $(this).attr("id");
    $("link[title!='']").attr("disabled","disabled"); 
	$("link[title='"+style+"']").removeAttr("disabled"); 

	$.cookie('mystyle', style, { expires: 7 }); // 存储一个带7天期限的 cookie 
})
var cookie_style = $.cookie("mystyle"); 
if(cookie_style!=null){ 
    $("link[title!='']").attr("disabled","disabled"); 
	$("link[title='"+cookie_style+"']").removeAttr("disabled"); 
} 
/*左侧导航栏显示隐藏功能*/
$(".subNav").click(function(){				
			/*显示*/
			if($(this).find("span:first-child").attr('class')=="title-icon glyphicon glyphicon-chevron-down")
			{
				$(this).find("span:first-child").removeClass("glyphicon-chevron-down");
			    $(this).find("span:first-child").addClass("glyphicon-chevron-up");
			    $(this).removeClass("sublist-down");
				$(this).addClass("sublist-up");
			}
			/*隐藏*/
			else
			{
				$(this).find("span:first-child").removeClass("glyphicon-chevron-up");
				$(this).find("span:first-child").addClass("glyphicon-chevron-down");
				$(this).removeClass("sublist-up");
				$(this).addClass("sublist-down");
			}	
		// 修改数字控制速度， slideUp(500)控制卷起速度
	    $(this).next(".navContent").slideToggle(300).siblings(".navContent").slideUp(300);
	})
/*左侧导航栏缩进功能*/
$(".left-main .sidebar-fold").click(function(){

	if($(this).parent().attr('class')=="left-main left-full")
	{
		$(this).parent().removeClass("left-full");
		$(this).parent().addClass("left-off");
		
		$(this).parent().parent().find(".right-product").removeClass("right-full");
		$(this).parent().parent().find(".right-product").addClass("right-off");
		
		}
	else
	{
		$(this).parent().removeClass("left-off");
		$(this).parent().addClass("left-full");
		
		$(this).parent().parent().find(".right-product").removeClass("right-off");
		$(this).parent().parent().find(".right-product").addClass("right-full");
		
		}
	})	
 
  /*左侧鼠标移入提示功能*/
		$(".sBox ul li").mouseenter(function(){
			if($(this).find("span:last-child").css("display")=="none")
			{$(this).find("div").show();}
			}).mouseleave(function(){$(this).find("div").hide();})	
})
</script>
</body>
</html>
